#!python

from kinect import *
from time import sleep

kf = KinectFinder()

if kf.GetKinectCount() < 1:
    print "Can't find Kinect, is one connected ?"
else:
    kin = kf.GetKinect()
    if kin == None:
        print "Error getting Kinect OOPS"
    else:
        l = MinimalListener()
        kin.AddListener(l)
        kin.SetMotorPosition(1)
        kin.SetLedMode(Led_Red)
        sleep(6)
        kin.SetMotorPosition(0)
        kin.SetLedMode(Led_Green)